home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HyperLib 1997 Winter - Disc 1
/
HYPERLIB-1997-Winter-CD1.ISO.7z
/
HYPERLIB-1997-Winter-CD1.ISO
/
オンラインウェア
/
PRG
/
Mac_F2C_1.3.2.sit
/
Mac F2C 1.3.2
/
Mac F2C Libraries
/
libF77 Sources
/
getpid.c
< prev
next >
Wrap
Text File
|
1995-09-09
|
1KB
|
80 lines
/*
Define the getpid() functions on the Macintosh.
Cannot use <unix.h> because it introduces name space conflicts.
IMT 4 Jan 93
Modified to work with both MetroWerks & Think C by
IMT 29 Nov 94 based on info provided by Dirk Froehling
Modified to work with Symantec C/C++ (Rainbow) 11 Apr 95 IMT
*/
#if defined(SPM_F2C) || defined(TPM_F2C) || defined(CW_F2C) || defined(MPW_CW_F2C)
#if defined(SPM_F2C) || defined(TPM_F2C)
extern int __pid;
extern int __ppid;
extern int __uid;
extern int __gid;
#undef getpid
#undef getpgrp
#undef getppid
#undef getuid
#undef geteuid
#undef getgid
#undef getegid
#endif /* TPM_F2C and SPM_F2C */
#if defined(CW_F2C) || defined(MPW_CW_F2C)
int __pid = 57;
int __ppid = 18;
int __uid = 24;
int __gid = 31;
#endif /* CW_F2C and MPW_CW_F2C */
int getpid( void )
{
return __pid;
}
int getpgrp( void )
{
return __pid;
}
int getppid( void )
{
return __ppid;
}
int getuid( void )
{
return __uid;
}
int geteuid( void )
{
return __uid;
}
int getgid( void )
{
return __gid;
}
int getegid( void )
{
return __gid;
}
#endif /* TPM_F2C, SPM_F2C, CW_F2C, and MPW_CW_F2C */